<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>询价</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <script src="__HOME__/js/jquery-1.9.1.min.js"></script>
   <!--  <script src="__HOME__/js/jquery-1.12.4.js"></script> -->
    <script src="/static/layer/layer.js"></script>
    <link rel="stylesheet" href="__HOME__/css/common22.css">
    <link rel="stylesheet" href="__HOME__/css/shengou.css">
    <link rel="stylesheet" type="text/css" href="__HOME__/bootstrap/css/bootstrap.min.css">
    <script src="__HOME__/bootstrap/js/bootstrap.min.js"></script>
    
  <!--   <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>   
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> -->
  
</head>
<body>
<!--头部开始-->
<header>
    <div class="main">
        <div class="back glyphicon glyphicon-menu-left" onclick="javascript:history.go(-1);"></div>
        <div class="minddle">询价</div>
       <!--  <div class="img"><img src="__HOME__/img/shengou1.png" alt=""></div> -->
    </div>
</header>
<!--头部结束-->
<!--内容开始-->
<div class="mid">
    <!-- <div class="mid-nav">
        <div class="inner">
            <ul class="min-ul1">
                <li><span class="list">申购</span></li>
            </ul>
        </div>
    </div> -->
    <!--&lt;!&ndash;标的股票&ndash;&gt;-->
    <div class="mid-content">
        <div class="inner">
            <div class="content-top">
                <h3>标的期权：</h3>
                <div><img src="__HOME__/img/shengou2.png" alt=""></div>
            </div>
            <div class="content-bottom cont-b">
                <input class="cont-bot-left" type="text" name="gupiao" placeholder="输入期权代码">
               <!--  <div class="cont-bot-midd "><img src="__HOME__/img/shengou3.png" alt=""></div> -->
                <p class="cont-bot-p">当前价：11.01</p>
            </div>
        </div>
    </div>
    <!--&lt;!&ndash;名义本金&ndash;&gt;-->
    <div class="mid-content">
        <div class="inner">
            <div class="content-top">
                <h3>名义本金：</h3>
                <div><img src="__HOME__/img/shengou2.png" alt=""></div>
            </div>
            <div class="content-bottom">
                <input class="cont-bot-left int2" type="text" name="jine" id="jine" placeholder="自定义金额">
                <p class="cont-bot-p">万元</p>
                <ul class="content-bottom cont-ul bot-u1">
                    <li class="li list" value="50">50万</li>
                    <li class="li" value="100">100万</li>
                    <li class="li" value="150">150万</li>
                </ul>
            </div>
        </div>
    </div>
    <div class="mid-content">
        <div class="inner">
            <div class="content-top">
                <h3>行权周期：</h3>
                <div><img src="__HOME__/img/shengou2.png" alt=""></div>
            </div>
            <ul class="content-bottom cont-ul bot-u2">
                <li class="now" value="1">一个月</li>
                <li value="2">两个月</li>
                <li value="3">三个月</li>
            </ul>
        </div>
    </div>
</div>
<!--内容结束-->
<!--询价-->
<div class="goumai">
    <div class="inner">
        <button class="goumai-foot" id="xunjia">询价</button> <!--  data-toggle="modal" data-target="#myModal"-->
    </div>
</div>
<!-- <div class="" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h1>询价结果</h1>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body">
                <ul class="content">
                    <li><span>标的股票：</span><span>平安银行00001</span></li>
                    <li><span>名利本金：</span><span class="span">50万元</span></li>
                    <li><span>行权周期：</span><span>6个月</span></li>
                    <li><span>报价比例：</span><span>17.09%</span></li>
                    <li><span>权利金：</span><span class="span">85450元</span></li>
                </ul> -->
               <!--  <table class="table">
                    <tr>
                        <td class="td ti">预期涨幅</td>
                        <td class="td ti">盈亏比例</td>
                        <td class="td ti">预期涨幅</td>
                    </tr>
                    <tr>
                        <td class="td">20%</td>
                        <td class="td">17.03%</td>
                        <td class="td">14550.00</td>
                    </tr>
                    <tr>
                        <td class="td">50%</td>
                        <td class="td">192.57%</td>
                        <td class="td">164550.00</td>
                    </tr>
                    <tr>
                        <td class="td">50%</td>
                        <td class="td">192.57%</td>
                        <td class="td">164550.00</td>
                    </tr>
                </table> -->
   <!--          </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">立即购买</button>
            </div>
        </div>
    </div>
</div> -->

</body>

<script>
//在这里面输入任何合法的js语句
    $('#xunjia').on('click', function(){

     var gupiao = $('.cont-bot-left').val();  //股票代码  
     var now = $('ul li.now').val(); //一个月 两个月  三个月
    
     if(jine)
     {
        var jine = $('#jine').val();  //获取自定义金额

     }else{

        var jine = $('ul li.list').val();//获取选定金额                                
     }
    
    if(!gupiao){layer.msg('请输入股票代码');return false;}

    var postdata = 'gupiao='+gupiao+"&now="+now+"&jine="+jine;
   
    var posturl = "/index/user/xunjia";
    $.post(posturl,postdata,function(resdata){
        //layer.msg(resdata.data);

        if(resdata == 1){

           layer.msg("输入错误");

           return false;

        }else{

        layer.open({
          type: 1 //Page层类型
          ,area: ['80%', '50%']
          ,title: ['询价结果','align:center;']
          ,shade: 0.6 //遮罩透明度
          ,anim: 1 //0-6的动画形式，-1不开启
          ,content: '<div style="padding:30px;"><ul class="content"><li><span>标的股票:</span><span>'+resdata['ming']+'</span></li><li><span>名义本金:</span><span class="span">50万元</span></li><li><span>行权周期:</span><span>'+now+'个月</span></li><li><span>报价比例:</span><span>17.09%</span></li><li><span>权利金:</span><span class="span">85450元</span></li></ul></div>'
        });

        }



    })

   
    });

    $(function(){
        $(".bot-u1>li").click(function(){
            $(this).addClass('list').siblings().removeClass('list');
        })
         $(".bot-u2>li").click(function(){
            $(this).addClass('now').siblings().removeClass('now');
        })

        // var aa=0;  //获取圆点的索引
        // $(".bot-u2>li").click(function(){
        //     //index=$(this).index();
        //     aa=$(this).index();
        //     $(".bot-u2>li").removeClass('now').eq(aa).addClass("now");
        //     $(".bot-u1>li").removeClass('list').eq(aa).addClass("list");
        // })
    });


  $(".goumai-foot").click(function(){
    $("#myModal").modal('show');
  });

   ///申请代理商
//function xun_jia() {
     //var gupiao = $('.cont-bot-left').val();
     //var now = $('.now').val();
     //var list = $('.list').val();
    
    // if(!gupiao){alert('请输入股票代码');return false;}
  
    //$(".Modal").click(function () {
        //加载模态框
        //$("#myModal").modal('show');
    //});


   // var postdata = 'gupiao='+gupiao+"&now="+now+"&list="+list;
    // if(id){
    //  postdata += "&id="+id
    // }
    // var posturl = "/index/user/xunjia";
    // $.post(posturl,postdata,function(resdata){
    //     layer.msg(resdata.data);

    //     if(resdata.type == 1){
    //         // setTimeout('gourl()',1000);
    //     }

    // })
    
//}
</script>
</html>